{% extends "base_user.html" %}

{% block title %}Your bookmarks{% endblock %}

{% block content_header %}Your bookmarks{% endblock %}

{% block main_content %}
{% if object_list %}
<ul>
{% for bookmark in object_list %}
<li><a href="{{ bookmark.snippet.get_absolute_url }}">{{ bookmark.snippet.title }}</a> (<a href="{{ bookmark.snippet.language.get_absolute_url }}">{{ bookmark.snippet.language.name }}</a>) by <a href="/users/{{ bookmark.snippet.author.username }}/">{{ bookmark.snippet.author.username }}</a> (bookmarked {{ bookmark.date|timesince }} ago) <a href="/bookmarks/delete/{{ bookmark.id }}/">Delete this bookmark</a></li>
{% endfor %}
</ul>

<p class="pagination">{% if has_previous %}<a href="?page={{ previous }}">Previous {{ results_per_page }}</a>{% endif %}&nbsp;&nbsp;{% if has_next %}<a href="?page={{ next }}">Next {{ results_per_page }} &gt;</a>{% endif %}
{% else %}
<p>You haven't bookmarked any snippets yet.</p>
{% endif %}

{% endblock %}

{% block sidebar %}
<p>To bookmark a snippet, just click the "add this snippet to your bookmarks" link on its page.</p>
<p>The snippets other users have bookmarked most often are:</p>
{% load popular %}
{% get_most_bookmarked 5 as most_bookmarked %}
<ol>
{% for snippet in most_bookmarked %}
<li><a href="{{ snippet.get_absolute_url }}">{{ snippet.title }}</a></li>
{% endfor %}
</ol>
{% endblock %}